﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects;
using Service.DataTransferObjects;

namespace Service
{
    public static class Mapper
    {
        public static CustomerDTO ToDataTransferObject(Customer customer)
        {
            return new CustomerDTO()
                       {
                           CustomerId = customer.CustomerId,
                           CompanyName = customer.CompanyName,
                           Name = customer.Name
                       };
        }

        public static Customer FromDataTransferObject(CustomerDTO customer)
        {
            return new Customer {Name = customer.Name, CompanyName = customer.CompanyName, CustomerId = customer.CustomerId};
        }

        public static Order FromDataTransferObject(OrderDTO customer)
        {
            return new Order();
        }
    }
}
